<template lang="pug">
  .m-time
    .left {{time}}
    .right
      .calendar {{calendar}}
      .week 星期{{week}}
</template>
<script>
import moment from 'moment'
const weeks = '天 一 二 三 四 五 六'.split(' ')
const out = {}

function getTime () {
  out.time = moment().format('HH:mm:ss')
  out.week = weeks[moment().day()]
  out.calendar = moment().format('YYYY/MM/DD')
}
getTime()

setInterval(() => {
  getTime()
}, 1000)
export default {
  name: 'MTime',
  data () {
    return out
  }
}
</script>

<style lang="stylus" scoped>
.m-time
  height 31px
  display flex
  line-height @height
  margin-top 11px

  .left
    font-size 24px
    color #39d6fe
    // font-w
    margin-right 26px
    margin-left 126px

  .right
    font-size 14px
    line-height 16px
    color #39d6fe
    text-align center
</style>
